<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>商品管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--    <script rel="script" type="text/javascript" th:src="@{/js/jquery-3.5.1.min.js}"></script>-->
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all">
    <link rel="stylesheet" th:href="@{/css/itemManager.css}"  media="all">
    <script rel="script" type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <script rel="script" type="text/javascript" th:src="@{/js/secKillItemManager.js}"></script>
    <script type="text/javascript" th:src="@{/js/formVerify.js}"></script>

</head>
<body>


<!--<button id="disableRole" type="button" class="layui-btn" style="margin-left: 40% ; display: none" onclick="" >禁用角色</button>-->
<!--<button id="enableRole" type="button" class="layui-btn" style="margin-left: 40% ; display: none" onclick="" >启用角色</button>-->
<table class="layui-hide" id="itemList" lay-filter="itemList"></table>

<script type="text/html" id="topTools">
    <form class="layui-form layui-form-pane" lay-filter="itemSearchForm">
    <div class="layui-inline">
<!--        <label class="layui-form-label">搜&nbsp;&nbsp;索:</label>-->
        <input id="searchItemName" type="text" class="layui-input-block" placeholder="请输入查询关键字(商品名)"/>
    </div>
    <div id="selectParentCategory" class="layui-input-block layui-inline " >
        <select id="parentCategorySelect" name="parentCategorySelect" lay-filter="parentCategory"  lay-event="parentCategory" class="select">
        </select>
    </div>
    <div id="selectChildCategory" class="layui-input-block layui-inline layui-hide" >
        <select id="childCategorySelect" name="childCategorySelect" lay-filter="childCategory" lay-event="childCategory" class="select ">
        </select>
    </div>
    <div class="layui-btn-container layui-inline"id="toolsBtnGroup">
        <button type="button" class="layui-btn layui-btn-normal" lay-event="searchItem">搜索商品</button>
        <button type="button" class="layui-btn layui-btn-normal" lay-event="addItem">新增商品</button>
        <button type="button" class="layui-btn layui-btn-danger" lay-event="reloadTable">刷新表格</button>
    </div>
    </form>
</script>

<script type="text/html" id="itemOperator">
    <a class="layui-btn  layui-btn-xs" lay-event="edit">编辑</a>
    {{# if(d.onOffStatus == 0 ){ }}
    <a class="layui-btn layui-btn-xs"  lay-event="enable">上架</a>
    {{# }else if(d.onOffStatus == 1 ){ }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="disable">下架</a>
    {{# } }}
</script>





<div id="createItem" style="display: none">
<!--    -->
    <form class="layui-form layui-form-pane" style="margin-left: 25%" autocomplete="off" >
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px; margin-left: 0px">
            <legend>商品设置</legend>
        </fieldset>
        <div class="layui-form-item">
            <div class="layui-inline" name="secKillItemName">
                <label class="layui-form-label">商品名</label>
                <input type="text" name="itemName" class="layui-input" lay-verify="required" style="width: 50%"><br>
            </div>
            <div class="layui-inline" name="itemParentCat">
                <label class="layui-form-label">父分类</label>
                    <div class="layui-input-block" style="width: 50%">
                        <select id="parentItemSelect" name="parentItemSelect" lay-filter="parentItem"  class="select">
                        </select>
                    </div><br>
            </div>
            <div class="layui-inline" name="itemChildCat">
                <label class="layui-form-label">子分类</label>
                    <div class="layui-input-block" style="width: 50%">
                        <select id="childItemSelect" name="childItemSelect" lay-filter="childItem"  class="select">
                        </select>
                    </div><br>
            </div>
            <div class="layui-inline" name="itemStock">
                <label class="layui-form-label">库存</label>
                <input type="text" name="stock" class="layui-input" lay-verify="required" style="width: 50%"><br>
            </div>
            <div class="layui-inline" name="secKillPrice">
                <label class="layui-form-label">秒杀价</label>
                <input type="text" name="secKillPrice" class="layui-input" lay-verify="required|price" style="width: 50%"><br>
            </div>
            <div class="layui-inline" name="secKillItemContent">
                <label class="layui-form-label">商品内容</label>
                <input type="text" name="content" class="layui-input" lay-verify="required" style="width: 50%"><br>
            </div><br>
            <div class="layui-inline" name="expiredTimeDiv">
                <label class="layui-form-label" >截止日期</label>
                <div class="layui-input-block">
                    <input id="chooseDate" type="text" name="expiredTime" lay-verify="required" class="layui-input" autocomplete="off" placeholder="yyyy-MM-dd HH:mm:ss">
                </div>
            </div><br>
            <div class="layui-inline" name="secKillIcon">
                <label class="layui-form-label">商品图片</label>
                <button type="button" class="layui-btn layui-btn-normal" id="secKillItemIcon">上传图片</button>
                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px; width: 80px" >
                    <div class="layui-upload-list" id="demo1"></div>
                </blockquote>
            </div>

            <input type="hidden" id="iconImage" lay-verify="required" value="">

            <input type="hidden" id="parentCategoryList" value="">

            <input type="hidden" id="childCategoryList" value="">

            <input type="hidden" id="itemId" value="">



<!--           -->
<!--            <div class="layui-inline">-->
<!--                <label class="layui-form-label">商品头图</label>-->
<!--                <input type="file" id="itemMainImage" name="itemMainImage" class="layui-input " accept="image/*" style="width: 50%"><br>-->
<!--            </div>-->
<!--            <div class="layui-inline">-->
<!--                <label class="layui-form-label">商品图片</label>-->
<!--                <input type="file" id="itemImages" name="itemImages" class="layui-input" accept="image/*" style="width: 50%" multiple><br>-->
<!--            </div>-->


            <hr class="hr15">
            <div class="layui-inline">
                <button type="button" id="btn_yes" class="layui-btn" style="margin-left: 40%">确定</button>
            </div>
        </div>
    </form>
</div>






</body>
<script>

</script>
</html>